<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/modules/phy/Decider80211.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00456.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Decider80211.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Decider80211.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *  Created on: 11.02.2009</span>
<a name="l00005"></a>00005 <span class="comment"> *      Author: karl wessel</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef DECIDER80211_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define DECIDER80211_H_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;BaseDecider.h&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;MappingBase.h&quot;</span>
<a name="l00014"></a>00014 
<a name="l00030"></a><a class="code" href="a00071.html">00030</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00071.html" title="Decider for the 802.11 modules.">Decider80211</a>: <span class="keyword">public</span> <a class="code" href="a00020.html" title="Provides some base functionality for most common deciders.">BaseDecider</a> {
<a name="l00031"></a>00031 <span class="keyword">public</span>:
<a name="l00033"></a><a class="code" href="a00071.html#aadf94ce46e3edca3fa4d93150f72f4ae">00033</a>   <span class="keyword">enum</span> <a class="code" href="a00071.html#aadf94ce46e3edca3fa4d93150f72f4ae" title="Control message kinds used by this Decider.">Decider80211ControlKinds</a> {
<a name="l00034"></a>00034     NOTHING = 22100,
<a name="l00036"></a><a class="code" href="a00071.html#aadf94ce46e3edca3fa4d93150f72f4aeae5c2edad30720b7e527373b28bd4e1ab">00036</a>     <a class="code" href="a00071.html#aadf94ce46e3edca3fa4d93150f72f4aeae5c2edad30720b7e527373b28bd4e1ab" title="Packet lost due to collision.">COLLISION</a>,
<a name="l00038"></a><a class="code" href="a00071.html#aadf94ce46e3edca3fa4d93150f72f4aea397fbae93de43832a0bb2bc1bf7003a5">00038</a>     LAST_DECIDER_80211_CONTROL_KIND
<a name="l00039"></a>00039   };
<a name="l00040"></a>00040 <span class="keyword">protected</span>:
<a name="l00042"></a><a class="code" href="a00071.html#a252eace2ccbe59484cd209be494a3983">00042</a>   <span class="keywordtype">double</span> <a class="code" href="a00071.html#a252eace2ccbe59484cd209be494a3983" title="threshold value for checking a SNR-map (SNR-threshold)">snrThreshold</a>;
<a name="l00043"></a>00043 
<a name="l00045"></a><a class="code" href="a00071.html#a15af6d061ab83d73474b6b94684707b6">00045</a>   <span class="keywordtype">double</span> <a class="code" href="a00071.html#a15af6d061ab83d73474b6b94684707b6" title="The center frequency on which the decider listens for signals.">centerFrequency</a>;
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">protected</span>:
<a name="l00050"></a><a class="code" href="a00071.html#a59da14e36530b3a420e960a2d517e5df">00050</a>   <span class="keyword">virtual</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a> <a class="code" href="a00071.html#a59da14e36530b3a420e960a2d517e5df" title="The lower band frequency at given time point.">getLowerBandFrequency</a>(simtime_t_cref pTimePoint)<span class="keyword"> const </span>{
<a name="l00051"></a>00051       <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>       argTimeFrequ(<a class="code" href="a00086.html#ac3f34a560d6c4ad5dc8d72dc69359b77" title="Shortcut to a DimensionSet which contains time and frequency.">DimensionSet::timeFreqDomain</a>);
<a name="l00052"></a>00052 
<a name="l00053"></a>00053       argTimeFrequ.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(pTimePoint);
<a name="l00054"></a>00054       argTimeFrequ.<a class="code" href="a00013.html#a27bd7000e865670a673039233424d2ab" title="Changes the value for the specified dimension.">setArgValue</a>(<a class="code" href="a00085.html#ad4360e7d88c881d06ee61033ad99d66f" title="Shortcut to the frequency Dimension, same as &#39;Dimension(&quot;frequency&quot;)&#39;, but spares the parsing of a ...">Dimension::frequency</a>, centerFrequency - 11e6);
<a name="l00055"></a>00055 
<a name="l00056"></a>00056       <span class="keywordflow">return</span> argTimeFrequ;
<a name="l00057"></a>00057   }
<a name="l00060"></a><a class="code" href="a00071.html#acdb12f5675ea4208432cc56aab3f2aec">00060</a>   <span class="keyword">virtual</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a> <a class="code" href="a00071.html#acdb12f5675ea4208432cc56aab3f2aec" title="The upper band frequency at given time point.">getUpperBandFrequency</a>(simtime_t_cref pTimePoint)<span class="keyword"> const </span>{
<a name="l00061"></a>00061     <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>       argTimeFrequ(<a class="code" href="a00086.html#ac3f34a560d6c4ad5dc8d72dc69359b77" title="Shortcut to a DimensionSet which contains time and frequency.">DimensionSet::timeFreqDomain</a>);
<a name="l00062"></a>00062 
<a name="l00063"></a>00063     argTimeFrequ.<a class="code" href="a00013.html#a8087982f050bdc61d787b128ca9ac8f9" title="Changes the time value of this argument.">setTime</a>(pTimePoint);
<a name="l00064"></a>00064     argTimeFrequ.<a class="code" href="a00013.html#a27bd7000e865670a673039233424d2ab" title="Changes the value for the specified dimension.">setArgValue</a>(<a class="code" href="a00085.html#ad4360e7d88c881d06ee61033ad99d66f" title="Shortcut to the frequency Dimension, same as &#39;Dimension(&quot;frequency&quot;)&#39;, but spares the parsing of a ...">Dimension::frequency</a>, centerFrequency + 11e6);
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     <span class="keywordflow">return</span> argTimeFrequ;
<a name="l00067"></a>00067   }
<a name="l00068"></a>00068 
<a name="l00076"></a>00076   <span class="keyword">virtual</span> <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>* <a class="code" href="a00020.html#ac6ef3a4cf1b91bcec788b540d61bfeba" title="Creates the DeciderResult from frame.">createResult</a>(<span class="keyword">const</span> airframe_ptr_t frame) <span class="keyword">const</span>;
<a name="l00077"></a>00077 
<a name="l00081"></a>00081   <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="a00020.html#a9f433fe8b7693074d3121320e50c85e3" title="Calculates the receive power of given frame.">getFrameReceivingPower</a>(airframe_ptr_t frame) <span class="keyword">const</span>;
<a name="l00082"></a>00082 
<a name="l00084"></a>00084   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> packetOk(<span class="keywordtype">double</span> snirMin, <span class="keywordtype">int</span> lengthMPDU, <span class="keywordtype">double</span> bitrate) <span class="keyword">const</span>;
<a name="l00085"></a>00085 
<a name="l00096"></a>00096   <span class="keyword">virtual</span> channel_sense_rssi_t <a class="code" href="a00020.html#ac7a2b437d463db0f1f8f85d5a9685c2c" title="Calculates the RSSI value for the passed interval.">calcChannelSenseRSSI</a>(simtime_t_cref start, simtime_t_cref end) <span class="keyword">const</span>;
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="keyword">public</span>:
<a name="l00101"></a>00101   <a class="code" href="a00071.html" title="Decider for the 802.11 modules.">Decider80211</a>( <a class="code" href="a00079.html" title="This class is the interface for a Decider to the BasePhyLayer.">DeciderToPhyInterface</a>* phy
<a name="l00102"></a>00102                 , <span class="keywordtype">double</span>                 sensitivity
<a name="l00103"></a>00103                 , <span class="keywordtype">int</span>                    myIndex
<a name="l00104"></a>00104                 , <span class="keywordtype">bool</span>                   debug );
<a name="l00105"></a>00105 
<a name="l00114"></a>00114   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00070.html#ae19a201633e5b2bf2d545921049b4f26" title="Initialize the decider from XML map data.">initFromMap</a>(<span class="keyword">const</span> ParameterMap&amp; params);
<a name="l00115"></a>00115 
<a name="l00116"></a>00116   <span class="keyword">virtual</span> ~<a class="code" href="a00071.html" title="Decider for the 802.11 modules.">Decider80211</a>() {};
<a name="l00117"></a>00117 };
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 <span class="preprocessor">#endif </span><span class="comment">/* DECIDER80211_H_ */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Decider80211.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
